##  Python does not offer real interfaces in its library, this implementation is a construction with behaviour similair to that of an interface.
#   Each method raises a NotImplementedError when the inheriting class does not implemented one of the methods listed in DriverInterface.
#   Methods in this class have default implementations, but these can be overwritten by inheriting classes.
class DriverInterface:

    ##  The constructor of DriverInterface.
    #   @param[in]  main Main wx.App derived instance.
    def __init__(self, main):
        raise NotImplementedError("DriverInterface.__init__ has not been implemented.")

    ##  Puts the system to sleep.
    def sleep(self):
        raise NotImplementedError("DriverInterface.sleep has not been implemented.")

    ##  Runs the system.
    def run(self):
        raise NotImplementedError("DriverInterface.run has not been implemented.")

    ##  Closes communication.
    def close(self):
        raise NotImplementedError("DriverInterface.close has not been implemented.")

    ##  Returns raw data.
    #   @param[in] id   The sensor ID from which we are requesting data.
    def get_sample(self,id):
        raise NotImplementedError("DriverInterface.get_sample has not been implemented.")

    ##  Applies the calibration procedure on the raw FoB data.
    #   Used by the CalibrateSingleSensor method.
    #   @param[in] rawData  The data that needs to be calibrated.
    def __CalibrateRawData(self, rawData):
        raise NotImplementedError("DriverInterface.__CalibrateRawData has not been implemented.")

    ##  Calculates the rotations x, y, and z resp. around the x-, y-, and z-axis.
    #   @param[in]  R   The matrix of which we are calculating the rotations.
    def __RotXYZ(self, R):
        raise NotImplementedError("DriverInterface.__RotXYZ has not been implemented.")

    ##  Calculate position vector of bony landmark relative to its sensors.
    #   @param[in]  stylusSensor    The sensor representing the stylus.
    #   @param[in]  sampleSensor    The sensor corresponding to the bony landmark.
    def GetBLRelativePosition(self, stylusSensor, sampleSensor):
        raise NotImplementedError("DriverInterface.GetBLRelativePosition has not been implemented.")

    ##  Calculates the endpoint of the stylus.
    #   @param[in]  sensorPosition  The position of the stylus.
    #   @param[in]  sensorRotation  The rotation of the stylus.
    def __StylusCompensation(self, sensorPosition, sensorRotation):
        raise NotImplementedError("DriverInterface.__StylusCompensation has not been implemented.")

    ##  Calculates the relative vector of the bony landmark w.r.t. the sensor.
    #   @param[in]  bonyLandmarkPosition    The position of the bony landmark.
    #   @param[in]  sensorPosition          The position of the sensor.
    #   @param[in]  sensorRotation          The rotation of the sensor.
    def __CalcBLVec(self, bonyLandmarkPosition, sensorPosition, sensorRotation):
        raise NotImplementedError("DriverInterface.__CalcBLVec has not been implemented.")

    ##  Calculates the global vector of the bony landmark w.r.t. the transmitter coordinate system.
    #   @param[in]  relativePosition    The relative position of the sensor.
    #   @param[in]  sensorPosition      The position of the sensor.
    #   @param[in]  sensorRotation      The rotation of the sensor.
    def RelativeToGlobal(self, relativePosition, sensorPosition, sensorRotation):
        raise NotImplementedError("DriverInterface.RelativeToGlobal has not been implemented.")

    ##  Gets position and rotation data for all sensors.
    def SampleSensors(self):
        raise NotImplementedError("DriverInterface.SampleSensors has not been implemented.")

    ##  Append a new 'OnPedal transform' to the "bony landmark - sensor mapping": imSensor.
    #   @param[in]  blIndex     The index of the bony landmark.
    #   @param[in]  sensorID    The ID of the sensor.
    def FetchBL_SensorPositionRotation(self, blIndex, sensorID):
        raise NotImplementedError("DriverInterface.FetchBL_SensorPositionRotation has not been implemented.")

    ##  Calibrate a single sensor.
    #   @param[in]  singleSensor    A sensor object.
    def CalibrateSingleSensor(self, singleSensor):
        raise NotImplementedError("DriverInterface.CalibrateSingleSensor has not been implemented.")